<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Kinetis Bootloader Host: Json::ValueMapAllocator Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Kinetis Bootloader Host
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
   <div id="projectbrief">Host Tools for Kinetis devices</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Introduction</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_json_1_1_value_map_allocator.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_json_1_1_value_map_allocator-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Json::ValueMapAllocator Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>Allocator to customize <a class="el" href="class_json_1_1_value.html" title="Represents a JSON value. ">Value</a> internal map. Below is an example of a simple implementation (default implementation actually use memory pool for speed).  
 <a href="class_json_1_1_value_map_allocator.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="json_8h_source.html">json.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a5f292d161455c5e524b3379d23e3b0b3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5f292d161455c5e524b3379d23e3b0b3"></a>
virtual <a class="el" href="class_json_1_1_value_internal_map.html">ValueInternalMap</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>newMap</b> ()=0</td></tr>
<tr class="separator:a5f292d161455c5e524b3379d23e3b0b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3773e6a3f9e4a812027fb790c7b648aa"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3773e6a3f9e4a812027fb790c7b648aa"></a>
virtual <a class="el" href="class_json_1_1_value_internal_map.html">ValueInternalMap</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>newMapCopy</b> (const <a class="el" href="class_json_1_1_value_internal_map.html">ValueInternalMap</a> &amp;other)=0</td></tr>
<tr class="separator:a3773e6a3f9e4a812027fb790c7b648aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac6742bcbe8e4ea67c7ac6d9245620b1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aac6742bcbe8e4ea67c7ac6d9245620b1"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>destructMap</b> (<a class="el" href="class_json_1_1_value_internal_map.html">ValueInternalMap</a> *map)=0</td></tr>
<tr class="separator:aac6742bcbe8e4ea67c7ac6d9245620b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c6cf50918e13e20edd5dd81c7bd96dc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0c6cf50918e13e20edd5dd81c7bd96dc"></a>
virtual <a class="el" href="class_json_1_1_value_internal_link.html">ValueInternalLink</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>allocateMapBuckets</b> (unsigned int size)=0</td></tr>
<tr class="separator:a0c6cf50918e13e20edd5dd81c7bd96dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3efe9ec84f1ccef0e8b7fcf20616a334"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3efe9ec84f1ccef0e8b7fcf20616a334"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>releaseMapBuckets</b> (<a class="el" href="class_json_1_1_value_internal_link.html">ValueInternalLink</a> *links)=0</td></tr>
<tr class="separator:a3efe9ec84f1ccef0e8b7fcf20616a334"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad1c75a6cb5bcbe9730dd825cc7e83b4d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad1c75a6cb5bcbe9730dd825cc7e83b4d"></a>
virtual <a class="el" href="class_json_1_1_value_internal_link.html">ValueInternalLink</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>allocateMapLink</b> ()=0</td></tr>
<tr class="separator:ad1c75a6cb5bcbe9730dd825cc7e83b4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a44b183cd506d7c5b130c551355246da8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a44b183cd506d7c5b130c551355246da8"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>releaseMapLink</b> (<a class="el" href="class_json_1_1_value_internal_link.html">ValueInternalLink</a> *link)=0</td></tr>
<tr class="separator:a44b183cd506d7c5b130c551355246da8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Allocator to customize <a class="el" href="class_json_1_1_value.html" title="Represents a JSON value. ">Value</a> internal map. Below is an example of a simple implementation (default implementation actually use memory pool for speed). </p>
<div class="fragment"><div class="line"><span class="keyword">class </span>DefaultValueMapAllocator : <span class="keyword">public</span> ValueMapAllocator</div><div class="line">{</div><div class="line"><span class="keyword">public</span>: <span class="comment">// overridden from ValueMapAllocator</span></div><div class="line">   <span class="keyword">virtual</span> ValueInternalMap *newMap()</div><div class="line">   {</div><div class="line">      <span class="keywordflow">return</span> <span class="keyword">new</span> ValueInternalMap();</div><div class="line">   }</div><div class="line"></div><div class="line">   <span class="keyword">virtual</span> ValueInternalMap *newMapCopy( <span class="keyword">const</span> ValueInternalMap &amp;other )</div><div class="line">   {</div><div class="line">      <span class="keywordflow">return</span> <span class="keyword">new</span> ValueInternalMap( other );</div><div class="line">   }</div><div class="line"></div><div class="line">   <span class="keyword">virtual</span> <span class="keywordtype">void</span> destructMap( ValueInternalMap *map )</div><div class="line">   {</div><div class="line">      <span class="keyword">delete</span> map;</div><div class="line">   }</div><div class="line"></div><div class="line">   <span class="keyword">virtual</span> ValueInternalLink *allocateMapBuckets( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> size )</div><div class="line">   {</div><div class="line">      <span class="keywordflow">return</span> <span class="keyword">new</span> ValueInternalLink[size];</div><div class="line">   }</div><div class="line"></div><div class="line">   <span class="keyword">virtual</span> <span class="keywordtype">void</span> releaseMapBuckets( ValueInternalLink *links )</div><div class="line">   {</div><div class="line">      <span class="keyword">delete</span> [] links;</div><div class="line">   }</div><div class="line"></div><div class="line">   <span class="keyword">virtual</span> ValueInternalLink *allocateMapLink()</div><div class="line">   {</div><div class="line">      <span class="keywordflow">return</span> <span class="keyword">new</span> ValueInternalLink();</div><div class="line">   }</div><div class="line"></div><div class="line">   <span class="keyword">virtual</span> <span class="keywordtype">void</span> releaseMapLink( ValueInternalLink *link )</div><div class="line">   {</div><div class="line">      <span class="keyword">delete</span> link;</div><div class="line">   }</div><div class="line">};</div></div><!-- fragment --> </div><hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="json_8h_source.html">json.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespace_json.html">Json</a></li><li class="navelem"><a class="el" href="class_json_1_1_value_map_allocator.html">ValueMapAllocator</a></li>
    <li class="footer">Generated on Mon Mar 7 2016 16:49:52 for Kinetis Bootloader Host by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
